package com.designCreator.command
{
	import com.designCreator.model.DesignCreatorProxy;
	import com.designCreator.model.vo.DesignCreatorRequest;
	import com.designCreator.notifications.NotificationNames;
	
	import mx.controls.Alert;
	import mx.utils.ObjectUtil;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	public class FabricDesignsCommand extends SimpleCommand
	{
		override public function execute( note : INotification ) : void
		{
			var designCreatorProxy:DesignCreatorProxy = facade.retrieveProxy(DesignCreatorProxy.NAME) 
				as DesignCreatorProxy;
			
			switch(note.getName())
			{
				//NOT IN USE NOW-GET_FABRIC_L1_DATA
				case NotificationNames.GET_FABRIC_L1_DATA:
					//designCreatorProxy.dummyLoadL1Configuration(note.getBody() as DesignCreatorRequest);
					break;
				//NOT IN USE NOW-GET_FABRIC_L2_DATA
				case NotificationNames.GET_FABRIC_L2_DATA:
					//designCreatorProxy.dummyLoadL2Configuration(note.getBody() as DesignCreatorRequest);
					break;
				
				case NotificationNames.LOAD_SOLID_FABRICS_DATA:
					designCreatorProxy.loadSolidFabricsDesign(note.getBody() as DesignCreatorRequest);
					break;
				case NotificationNames.LOAD_WHITE_FABRICS_DATA:
					designCreatorProxy.loadWhiteFabricsDesign(note.getBody() as DesignCreatorRequest);
					break;
			}
			
		}
	}
}